]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Use actual container allocation
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 26 Jun 2020 01:22:29 +0000 (03:22 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 6 Jul 2020 22:06:53 +0000 (00:06 +0200)
We currently assume that the passed in Clutter.ActorBox matches
the container allocation, but in reality it is the container's
content area.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345

js/ui/workspace.js

index f4189ec4dac654fe66ced2e4215d5969d6518010..0caf95d379e0b08f59ff648e10a010189a0fe387 100644 (file)
@@ -560,9 +560,10 @@ var WorkspaceLayout = GObject.registerClass({
     }
 
     vfunc_allocate(container, box) {
+        const containerBox = container.allocation;
         const containerAllocationChanged =
-            this._lastBox === null || !this._lastBox.equal(box);
-        this._lastBox = box.copy();
+            this._lastBox === null || !this._lastBox.equal(containerBox);
+        this._lastBox = containerBox.copy();
 
         // If the containers size changed, we can no longer keep around
         // the old windowSlots, so we must unfreeze the layout
@@ -582,7 +583,7 @@ var WorkspaceLayout = GObject.registerClass({
                 this._windowSlots = this._getWindowSlots(box.copy());
         }
 
-        const allocationScale = box.get_width() / this._workarea.width;
+        const allocationScale = containerBox.get_width() / this._workarea.width;
 
         const workspaceBox = new Clutter.ActorBox();
         const layoutBox = new Clutter.ActorBox();